package com.crealth.model;

import java.io.Serializable;
import java.sql.Timestamp;

import com.alibaba.fastjson.JSONObject;

public class VisitRecordModel implements Serializable {
	private static final long serialVersionUID = 2140701L;
	
	private long id;
	private int userID;
	private String mobi;
	private String memo;
	private int clientType;
	private Timestamp visitTm;
	
	public VisitRecordModel() {
		id = 0;
		userID = 0;
	}
	
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}

	public int getUserID() {
		return userID;
	}

	public void setUserID(int userID) {
		this.userID = userID;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public String getMobi() {
		return mobi;
	}

	public void setMobi(String mobi) {
		this.mobi = mobi;
	}

	public int getClientType() {
		return clientType;
	}

	public void setClientType(int clientType) {
		this.clientType = clientType;
	}

	public Timestamp getVisitTm() {
		return visitTm;
	}

	public void setVisitTm(Timestamp visitTm) {
		this.visitTm = visitTm;
	}
	
	public JSONObject toJSONObject() {
		JSONObject jsonObj = new JSONObject();
		jsonObj.put("Mobi", mobi);
		jsonObj.put("visitID", id);		
		jsonObj.put("memo", memo);
		jsonObj.put("cliType", clientType);
		jsonObj.put("visitTm", visitTm.getTime()/1000);
		
		return jsonObj;
	}
	
}
